﻿@model S4Store.Models.Markting.GXJHHistoryModel
@{
    Layout = null;
    ViewBag.Title = "GXJHHistory";

    S4Store.Models.Chart.Line ChartModel1 = new S4Store.Models.Chart.Line();
    ChartModel1.Name = "广宣资金投入额";
    ChartModel1.YAxis = "万元";
    ChartModel1.IsRate = false;
    S4Store.Models.Chart.ChartSeries series1 = new S4Store.Models.Chart.ChartSeries();
    series1.Name = "目标广宣预算";
    S4Store.Models.Chart.ChartSeries series2= new S4Store.Models.Chart.ChartSeries();
    series2.Name = "实际广宣投入";
    ChartModel1.Serieses.Add(series1);
    ChartModel1.Serieses.Add(series2);
    for (DateTime dt = Model.Start; dt <= Model.End; dt = dt.AddMonths(1))
    {
        ChartModel1.XAxis.Add(dt.ToString("M月"));
        var report = Model.Reports.FirstOrDefault(t => t.Year == dt.Year && t.Month == dt.Month);
        series1.Data.Add(report.ExhibitionMonthConfig.GXYSYDFJS);
        series2.Data.Add(report.DYGXZJTRE);
    }


    S4Store.Models.Chart.Line ChartModel2 = new S4Store.Models.Chart.Line();
    ChartModel2.Name = "广宣预算资金到位率";
    ChartModel2.YAxis = "比率(%)";
    series1 = new S4Store.Models.Chart.ChartSeries();
    series1.Name = "目标到位率";
    series2 = new S4Store.Models.Chart.ChartSeries();
    series2.Name = "实际到位率";
    ChartModel2.Serieses.Add(series1);
    ChartModel2.Serieses.Add(series2);

    for (DateTime dt = Model.Start; dt <= Model.End; dt = dt.AddMonths(1))
    {
        ChartModel2.XAxis.Add(dt.ToString("M月"));
        var report = Model.Reports.FirstOrDefault(t => t.Year == dt.Year && t.Month == dt.Month);
        series1.Data.Add(100);
        series2.Data.Add(report.GXYSZJDWLV);
    }


    S4Store.Models.Chart.Line ChartModel3 = new S4Store.Models.Chart.Line();
    ChartModel3.Name = "广宣计划执行率";
    ChartModel3.YAxis = "比率(%)";
    series1 = new S4Store.Models.Chart.ChartSeries();
    series1.Name = "目标执行率";
    series2 = new S4Store.Models.Chart.ChartSeries();
    series2.Name = "实际执行率";
    ChartModel3.Serieses.Add(series1);
    ChartModel3.Serieses.Add(series2);

    for (DateTime dt = Model.Start; dt <= Model.End; dt = dt.AddMonths(1))
    {
        ChartModel3.XAxis.Add(dt.ToString("M月"));
        var report = Model.Reports.FirstOrDefault(t => t.Year == dt.Year && t.Month == dt.Month);
        series1.Data.Add(100);
        series2.Data.Add(report.GXJHSSLV);
    }
}
<div style="height:100%; width:100%; overflow:auto">
@Html.Action("ReportBar", "Common", Model.BarModel)
<div class="pageContent">
	
	<div class="tabs" currentIndex="0" eventType="click">
		<div class="tabsHeader">
			<div class="tabsHeaderContent">
				<ul>
					<li><a href="javascript:;"><span>广宣资金投入额</span></a></li>
					<li><a href="javascript:;"><span>广宣预算资金到位率</span></a></li>
					<li><a href="javascript:;"><span>广宣计划执行率</span></a></li>
				</ul>
			</div>
		</div>
		<div class="tabsContent" >
			<div>
            @Html.Partial("../Chart/Line", ChartModel1)
			</div>
			<div>
            @Html.Partial("../Chart/Line", ChartModel2)
			</div>
            <div>
            @Html.Partial("../Chart/Line", ChartModel3)
			</div>
		</div>
		<div class="tabsFooter">
			<div class="tabsFooterContent"></div>
		</div>
	</div>
</div>

</div>
